function BaseListDataProvider() {
	//this.elements = [{ id : 1, name : 'aaa', age : 3.5}, { id : 2, name : 'bbb', age : 3.5}];
	this.elements = [];
	//this.columns = ['id', 'name', 'age'];
	this.sortStatus = {};
	
	this.pager = {
		size : 10, 
		start : 0, 
		next : function() {
		},
		prev : function() {
		},
		home : function() {
		}
	};
	
	this.toggleSort = function(columnName) {
		//alert(columnName);
		if (this.sortStatus[columnName] == null) {
			this.sortStatus[columnName] = 1;
			
		} else if (this.sortStatus[columnName] == 1) {
			this.sortStatus[columnName] = -1;
			
		} else if (this.sortStatus[columnName] == -1) {
			this.sortStatus[columnName] = 1;
			
		}
		
		this.sort(columnName, this.sortStatus[columnName]);
	};
	
	this.getSortStatus = function(columnName) {
		if (this.sortStatus[columnName] == null) {
			return null;
		}
		if (this.sortStatus[columnName] == 1) {
			return "Up";
		} else {
			return "Down";
		}
	};
	
	this.sort = function(columnName, direction) {
		this.sortStatus[columnName] = direction;
		var pointer2this = this;
		
		this.elements = this.elements.sort(function(a, b) {
				
				var valueA = eval('a.'+columnName);
				var valueB = eval('b.'+columnName);
				
				//alert(valueA+":"+valueB);
				var res = 0;
				if (valueA < valueB) {
					res = -1;
				}
				if (valueA > valueB) {
					res = 1;
				}
				
				return res * direction;
			
		});
	};
	
	this.singleSelection = true;
	this.lastSelectedRow = null;
	
	this.selectRow = function(row) {
		//alert('here');
		if (this.singleSelection) {
			if (row.selected == true) {
				row.selected = false;
				return;
			}
			for (var i = 0; i < this.elements.length; i++) {
				this.elements[i].selected = false;
			}
			
			row.selected = true;
		} else {
			if (row.selected == true) {
				row.selected = false;
			} else {
				row.selected = true;
			}
		}
		
		this.lastSelectedRow = row;
	};
	

};
